Use this function below to count the number of serial numbers in a form
field. If more than the maximum have been entered the user gets a
confirm box telling them that the remainder will be ignored if they
continue. Serial numbers must be separated by spaces or new lines.
checkSerialNumber(maximum, objForm)
maximum: the maximum number of serial numbers allowed (integer)
objForm: the form name
Ezra Castillo
6/5/03
*/
function countSerialNumbers(maximum, objForm) {
var serial_numbers = objForm.serial_numbers.value;
var regexp = /\s/;
var serialArray = serial_numbers.split(regexp);
var arrayCount = serialArray.length;
if (arrayCount > maximum) {
if (confirm("You have entered " + arrayCount + " serial numbers which is more than the " + maximum + " allowed. To \ncontinue \'Click OK\' below to process the first " + maximum + " serial numbers, noting the \nremaining will not be processed ignoring the rest. Click Cancel below to return \nto the form to edit your list of serial numbers."))
This function pops up alert boxes based on the key passed to the function.
Ezra Castillo
6/5/03
*/
function alertBoxPop(key) {
// add new definitions here as needed
// please list in alphabetical order
if (key.toUpperCase() == "ADVANCE_RMA") alert('Help: Advance Replacement \n\nCreate an Advance Return Material Authorization (RMA) for a defective product. A replacement product will be shipped to you first. A credit card is required.');
else if (key.toUpperCase() == "EXPIRATION_DATE") alert('Help: Expiration Date \n\nThe warranty on this hard drive expires at midnight at the beginning of the date listed.');
else if (key.toUpperCase() == "REPLACEMENT_PROCESS") alert('Help: Replacement Process \n\nFollow Steps 3 through 8.');
else if (key.toUpperCase() == "STANDARD_RMA") alert('Help: Standard Replacement \n\nCreate a Standard Return Material Authorization (RMA) for a defective product. The replacement product will be shipped after the defective product has been received. A credit card is not required.');
else if (key.toUpperCase() == "TLA") alert('Help: TLA Number \n\nThe Top Level Assembly (TLA) number contains the hard drive\'s \nmodel number. TLA numbers are used in our warranty database \nto help identify a hard drvies\'s product family and capacity point. \nThe TLA number can be found on the label located on the top of \nthe hard drive. The TLA number may also be referred to as the \n\"material number\" by our customer service department.');
else if (key.toUpperCase() == "CHECK_STATUS") alert('Help: Status \n\nThis column will display the current processing status of your \nRMA. RMA status can be obtained for all RMA\'s created on our web \nsite or through our Customer Support Center. You will also be notified by e-mail \nwhen your replacement drive has been shipped from Maxtor.');
else if (key.toUpperCase() == "CHECK_MESSAGE") alert('Help: Tracking Number \n\nIf your replacement drive has been shipped from Maxtor, the shipper\'s \ntracking number will be displayed in this column. If a tracking \nnumber is displayed, please click on it to obtain current shipping status.');
if (confirm("Click OK below to return to the main page of this application \nto add another serial number. Note that the current Warranty \nStatus Results will be lost. Click Cancel below to remain on \nthis page."))
This function pops up a confirm box for the High Volume Warranty Lookup
application when the user clicks a link to start the process over. If OK
is pressed they are sent to the beginning of the application. Otherwise no
action is taken.
Ezra Castillo
6/5/03
*/
function hvwlStartOver() {
if (confirm("Click OK below to return to the main page of this application to \nadd more serial numbers. Note that the current Warranty Status \nResults will be lost. \n\nClick Cancel below to remain on this page."))
window.location.href = "index.cfm";
}
/*
Ezra Castillo
7/20/2003
*/
function createRMAConfirm(){
var value = document.shippack.ship_and_pack.checked;
if (value == false){
if (confirm("You must agree to follow these Procedures to continue this RMA \nprocess. Click OK below to return to this page to check the checkbox \nstating you agree to the Procedure detailed here. Click Cancel \nbelow to end this RMA process (your information will not be saved)."))
return false;
}
}
/*
Ezra Castillo
7/24/2003
*/
function purchaseLoc(){
var country = document.troubleshoot.shipping_country.value;
if (confirm("You must agree to follow these Procedures to continue this RMA \nprocess. Click OK below to return to this page to check the checkbox \nstating you agree to the Procedure detailed here. Click Cancel \nbelow to end this RMA process (your information will not be saved)."))